package com.boot.imply.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.boot.imply.dao.WikipediaMapper;
import com.boot.imply.entity.Wikipedia;
import com.boot.imply.service.WikipediaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WikipediaServiceImpl implements WikipediaService {

    @Autowired
    private WikipediaMapper wikipediaMapper;

    @Override
    public List<Wikipedia> seletcs() {
        List<Wikipedia> queryList = wikipediaMapper.selects();
        return queryList;
    }

    @Override
    public IPage<Wikipedia> page(Integer page, Integer size) {
        IPage<Wikipedia> ipage = new Page<>(page, size);
        return wikipediaMapper.page(ipage);
    }
}
